const burger = document.querySelector(".burger");
const headerMainMenu = document.querySelector(".header__menu-main");
const menuLink = document.querySelectorAll(".header__menu-link");
const body = document.querySelector("body");

document.addEventListener("DOMContentLoaded", function () {
  burger.addEventListener("click", function () {
    headerMainMenu.classList.toggle("open");
    body.classList.toggle("lock");
  });

  menuLink.forEach(function (e) {
    e.addEventListener("click", function () {
      headerMainMenu.classList.remove("open");
      body.classList.remove("lock");
    });
  });
});
